#pragma once

#ifndef SPRING_H
#define SPRING_H

#include "ForceGenerator.h"

class Spring : public ForceGenerator
{
protected:
	Particle* other;
	float springConstant;
	float restLength;
public:
	Spring(Particle* particle, float springConstant, float restLength)
		: other(particle), springConstant(springConstant), restLength(restLength)
	{
	}
	virtual ~Spring() {}
	virtual void updateForce(Particle* particle, float frameTime);
};

#endif